# 数据库配置
class DatabaseConfig(object):
    # USERNAME = 'root'
    # PASSWORD = '123456'
    # HOSTNAME = '127.0.0.1'
    # PORT = '3306'
    # DATABASE = 'new_library'

    USERNAME = 'root'
    PASSWORD = '123'
    HOSTNAME = '127.0.0.1'
    PORT = '3306'
    DATABASE = 'food_discover'


    # 连接的数据库 URI
    # mysql://用户名:密码@host:port/database
    SQLALCHEMY_DATABASE_URI = f"mysql://{USERNAME}:{PASSWORD}@{HOSTNAME}:{PORT}/{DATABASE}?charset=utf8mb4"
    # 是否追踪数据的修改
    SQLALCHEMY_TRACK_MODIFICATIONS = True
    # 是否显示生成sql语句
    SQLALCHEMY_ECHO = True
